<template>
  <a-modal
    title="参数查看"
    :width="640"
    :visible="visible"
    @ok="handleOk"
    @cancel="handleCancel">
    <json-viewer
      :value="data"
      :expand-depth="5"
      copyable
      boxed
      sort></json-viewer>
  </a-modal>
</template>

<script>
import JsonViewer from 'vue-json-viewer'
export default {
  data () {
    return {
      visible: false,
      data: ''
    }
  },
  components: { JsonViewer },
  computed: {
  },
  methods: {
    open (data) {
      this.data = data
      this.visible = true
    },
    handleOk (e) {
      this.visible = false
    },
    handleCancel () {
      this.visible = false
    }
  }
}
</script>
